package net.melon.sso;

public interface SSOConstants {

	/**
	 * 是否允许系统自动设置额外属性。
	 * 默认为否
	 * 如果为否，则有系统参数指定具体的额外属性
	 * 
	 */
	public static final String CONFIG_SSO_MEMBER_AUTO_EXTRA_VALUE = "sso.member.auto.extra.value";
	
	/**
	 * 系统指定额外属性的配置前缀
	 */
	public static final String CONFIG_SSO_MEMBER_EXTRA_NAME_PREKEY ="member.extra.perkey";
	
	public static final String CONFIG_SSO_MEMBER_DEFAULT_REGISTRY_TYPE ="sso.member.reg.type";
	
	public static final String CONFIG_SSO_MEMBER_WEIXIN_TYPE ="sso.member.weixin.type";
	
	public static enum MemberState{
		
		NORMAL(1),FREEZE(0),DELETED(-1);
		
		private int state;

		private MemberState(int state) {
			this.state = state;
		}

		public int getState() {
			return state;
		}
		
		public MemberState valueOf(int state){
			for(MemberState st : values()){
				if(st.getState() == state){
					return st;
				}
			}
			return null;
		}
	}
}
